<?php
$this->Paginator->options(array(
    'update' => '#container',
    'before' => $this->Js->get('#loader')->effect('fadeIn',array('buffer'=>false)),
    'complete' => $this->Js->get('#loader')->effect('fadeOut',array('buffer'=>false))
       
));
?>
<div id="sideBar">
    <ul class="sideNav">
        <li><?php echo $this->Html->link(__('Új Tartalom'), array('action' => 'add')); ?></li>
        <li><?php echo $this->Html->link(__('Galériák listázása'), array('controller' => 'galleries', 'action' => 'index')); ?> </li>
        <li><?php echo $this->Html->link(__('Új Galéria'), array('controller' => 'galleries', 'action' => 'add')); ?> </li>
    </ul>
</div>

<div id="main">
    <table cellpadding="0" cellspacing="0" id="contents">
        <tr>

            <th><?php echo $this->Paginator->sort('menu', 'Menüpont neve'); ?></th>	
            <th><?php echo $this->Paginator->sort('gallery_id', 'Galéria neve'); ?></th>
            <th><?php echo $this->Paginator->sort('sort_order', 'Sorrend'); ?></th>
            <th class="actions"><?php echo __('Műveletek'); ?></th>
        </tr>
        <?php foreach ($contents as $content): ?>
            <tr>		
                <td><?php echo h($content['Content']['menu']); ?>&nbsp;</td>

                <td>
                    <?php echo $this->Html->link($content['Gallery']['name'], array('controller' => 'galleries', 'action' => 'view', $content['Gallery']['id'])); ?>
                </td>
                <td><?php echo h($content['Content']['sort_order']); ?>&nbsp;</td>

                <td class="action">
                    <?php echo $this->Html->link(__('Megtekintés'), array('action' => 'view', $content['Content']['id']), array('class' => 'view')); ?>
                    <?php echo $this->Html->link(__('Szerkesztés'), array('action' => 'edit', $content['Content']['id']), array('class' => 'edit')); ?>
                    <?php echo $this->Form->postLink(__('Törlés'), array('action' => 'delete', $content['Content']['id']), array('class' => 'delete'), __('Biztos törölni szeretnéd a # %s tartalmat ?', $content['Content']['id'])); ?>
                    <?php echo $this->Html->link($this->Html->image('images/up.png'), array('action' => 'admin_decrement', $content['Content']['id']),array('escape' => false,'class'=>'sortorder')); ?>
                    <?php echo $this->Html->link($this->Html->image('images/down.png'), array('action' => 'admin_increment', $content['Content']['id']),array('escape' => false,'class'=>'sortorder')); ?>
                </td>
            </tr>
        <?php endforeach; ?>
    </table>
    <p>
        <?php
                echo $this->Paginator->counter(array(
            'format' => __(' {:page} oldal a(z) {:pages} oldalból.')
        ));
        ?>	</p>
    <div class="paging">
        <?php
        echo $this->Paginator->prev('< ' . __('Előző'), array(), null, array('class' => 'prev disabled'));
        echo $this->Paginator->numbers(array('separator' => ''));
        echo $this->Paginator->next(__('Következő') . ' >', array(), null, array('class' => 'next disabled'));
        ?>
    </div>


</div>
<div class="clear"></div>